<%@ page title="" language="C#" masterpagefile="~/RealtimeSite.master" autoeventwireup="true" inherits="NewsMaster, App_Web_pwjjhxl1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <link href="css/googleapis.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .textbox
        {
        }
        .btnRt003366
        {
        }
        #MainContent_UpdatePanel1
        {
            width:100%;
        }
        .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: .05rem 0rem;
    /* margin-bottom: 1rem; */
    list-style: none;
    background-color: #fff !important;
    border-radius: .25rem;
    color: #E15C11;
    font-size: 18px;
    font-weight: 500;
}
                   .card [class*=card-header-]:not(.card-header-icon):not(.card-header-text):not(.card-header-image) {
    border-radius: 3px;
      margin-top: -37px;
    padding: 7px !important;
}

.grid-lable {
    height: 150px;
    overflow-y: scroll;
    border: 1px solid #ddd;
    margin-left: -10px;
    margin-right: -10px;
    padding: 6px;
}
.grid-lable label {
 font-size: 15px !important;
    line-height: 1.02857 !important;
    color: #333 !important;
    font-weight: 200 !important;
    padding-left: 7px !important;
    padding-top: -3px !important;
    position: relative !important;
    top: -3px !important;
}
.grid-lable span {
 font-size: 15px !important;
    line-height: 1.52857 !important;
    color: #333 !important;
    font-weight: 200 !important;
    padding-left: 7px !important;
    padding-top: -3px !important;
    position: relative !important;
    top: -3px !important;
}
#inputSearch
{
    margin-top:6px;
    margin-bottom:6px;
}
#MainContent_lblNews
{
      font-size:15px;
    font-weight:bold;  
}
body
{
font-family: 'Arimo', sans-serif !important;
}
#MainContent_lblSelectionBy
{
    font-size: 15px;
    font-weight: 600;
}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    db<script language="javascript" type="text/javascript">
        function ConfirmDelete() {
            return confirm("Do you want to delete all these records?")
        }

      

     
    </script><div class="main-panel">
        <div class="content">
        <div class="container" id="newsmaster12" runat="server">
    <div class="row dash-pane2">
    <div class="card">
                <div class="card-header card-header-warning">
                  <h4 class="card-title"><i class="fa fa-edit fa-fw"></i><asp:Label ID="lblSendNewstoEmployee" runat="server" Text="Send News to Employee"></asp:Label></h4>
                </div>
                <div class="card-body table-responsive">
                 <div class="row">
                 <div class="col-lg-12">
                        <b><asp:Label ID="lblNews" runat="server" Text="News"></asp:Label> </b>
                        <asp:TextBox ID="txtnews" runat="server" class="form-control" Height="60px" 
                            TextMode="MultiLine" />
                    </div>
                 </div>
                 <div class="row breadcrumb" style="margin-top:0px;">
                 <b><asp:Label ID="Label1" runat="server" Text="Selection By"></asp:Label></b>
                 </div>
                 <div class="row" style="margin-top:-30px;">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                        </div>
                            <div class="row" style="margin-left:10px; margin-right:10px; margin-top:10px; width:100%">
                            <ul class="list-inline" style="width:100%; display:contents">
                            <li style="width:17.5%; margin-left:15px;">
                            <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                     <asp:RadioButton ID="SelectAllCommany" runat="server" Checked="True" GroupName="Cmpny"
                                        Text="" AutoPostBack="True" OnCheckedChanged="SelectAllCommany_CheckedChanged" /><asp:Label
                                            ID="lblAllCompany" runat="server" Text="All Company"></asp:Label><br />
                                    <asp:RadioButton ID="FewCompany" runat="server" GroupName="Cmpny" Text="" OnCheckedChanged="FewCompany_CheckedChanged" /><asp:Label
                                        ID="lblFewCompany" runat="server" Text="Few Company"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox1_CheckedChanged"
                                        Text="" /><asp:Label ID="lblcompanySelectAllDeSelectAll" runat="server" Text="SelectAll/De-Select All"></asp:Label>                           
                            </div>
                                <div class="grid-lable">  

                                    <asp:CheckBoxList ID="chkcompanylist" runat="server" AutoPostBack="True" Font-Size="12px"
                                        OnSelectedIndexChanged="chkcompanylist_SelectedIndexChanged">
                                    </asp:CheckBoxList>
                                </div>
                            </li>
                            <li style="width:17.5%; margin-left:27px;">
                            <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                     <asp:RadioButton ID="Allshift" runat="server" GroupName="shift1" Text="" Checked="True"
                                        AutoPostBack="True" OnCheckedChanged="Allshift_CheckedChanged" /><asp:Label ID="lblAllBranch"
                                            runat="server" Text="All  Branch"></asp:Label><br />
                                    <asp:RadioButton ID="Allshift1" runat="server" GroupName="shift1" Text="" AutoPostBack="True"
                                        OnCheckedChanged="Allshift1_CheckedChanged" /><asp:Label ID="lblFewBranch" runat="server"
                                            Text="Few Branch"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox2_CheckedChanged"
                                        Text="" /><asp:Label ID="lblbranchSelectAllDeSelectAll" runat="server" Text="SelectAll/De-Select All"></asp:Label>                           
                            </div>
                             <div class="grid-lable">  

                                    <asp:CheckBoxList ID="Chkshiftlist" runat="server" AutoPostBack="True" Font-Size="12px"
                                        OnSelectedIndexChanged="Chkshiftlist_SelectedIndexChanged">
                                    </asp:CheckBoxList>
                                   </div>                           
                            </li>
                            <li style="width:17.5%; margin-left:27px;">
                            <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                       <asp:RadioButton ID="AllDesignation" runat="server" Checked="True" GroupName="Dept"
                                        Text="" OnCheckedChanged="AllDesignation_CheckedChanged" /><asp:Label ID="lblAllDepartment"
                                            runat="server" Text="All Department"></asp:Label><br />
                                    <asp:RadioButton ID="optfewDesignation" runat="server" GroupName="Dept" Text="" OnCheckedChanged="optfewdept_CheckedChanged" /><asp:Label
                                        ID="lblFewDepartment" runat="server" Text="Few Department"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox3" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox3_CheckedChanged"
                                        Text="" /><asp:Label ID="lbldeptSelectAllDeSelectAll" runat="server" Text="SelectAll/De-Select All"></asp:Label>
                            </div>
                               <div class="grid-lable">  

                                    <asp:CheckBoxList ID="chkdepartmentlist" runat="server" AutoPostBack="True" Font-Size="12px"
                                        OnSelectedIndexChanged="chkdepartmentlist_SelectedIndexChanged">
                                    </asp:CheckBoxList>
                                </div>                           
                            </li>
                            <li style="width:17.5%; margin-left:27px;">
                            <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                    <asp:RadioButton ID="RadioButton1" runat="server" Checked="True" GroupName="Desig"
                                        Text="" OnCheckedChanged="RadioButton1_CheckedChanged" /><asp:Label ID="lblAllDesignation"
                                            runat="server" Text="All  Designation"></asp:Label><br />
                                    <asp:RadioButton ID="optFewEmployee0" runat="server" AutoPostBack="True" GroupName="Desig"
                                        OnCheckedChanged="optAllemployee_CheckedChanged" Text="" />
                                    <asp:Label ID="lblFewDesignation" runat="server" Text="Few Designation"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox4" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox4_CheckedChanged"
                                        Text="" /><asp:Label ID="lblDesignationSelectAllDeSelectAll" runat="server" Text="SelectAll/De-Select All"></asp:Label>
                            </div>
                                <div class="grid-lable">  

                                    <asp:CheckBoxList ID="ChkDesignationList" runat="server" AutoPostBack="True" Font-Size="12px"
                                        OnSelectedIndexChanged="ChkDesignationList_SelectedIndexChanged">
                                    </asp:CheckBoxList>
                                </div>                           
                            </li>
                            <li style="width:17.5%; margin-left:27px;">
                             <div class="grid-lable2" style="margin-left:-11px; margin-bottom:5px;">
                                     <asp:RadioButton ID="optAllemployee" runat="server" AutoPostBack="True" Checked="True"
                                        GroupName="Emp" OnCheckedChanged="optAllemployee_CheckedChanged" Text="" ClientIDMode="Static"
                                        onclick="sharad();" /><asp:Label ID="lblAllemployee" runat="server" Text="All  employee"></asp:Label><br />
                                    <asp:RadioButton ID="optFewEmployee" runat="server" AutoPostBack="True" GroupName="Emp"
                                        Text="" OnCheckedChanged="optFewEmployee_CheckedChanged" ClientIDMode="Static"
                                        onclick="sharad();" /><asp:Label ID="lblFewEmployee" runat="server" Text="Few Employee"></asp:Label><br />
                                    <asp:CheckBox ID="CheckBox5" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox5_CheckedChanged"
                                        Text="" ClientIDMode="Static" onclick="sharad();" /><asp:Label ID="lblemployeeSelectAllDeSelectAll"
                                            runat="server" Text="SelectAll/De-Select All"></asp:Label>
                                                               
                             </div>
                                 <div class="grid-lable">  
                                 <asp:TextBox runat="server" ID="inputSearch" ClientIDMode="Static" Height="21px"
                                        placeholder="Search employee" CssClass="form-control" /> 
                                    <asp:CheckBoxList ID="chkemployeelist" runat="server" OnSelectedIndexChanged="chkemployeelist_SelectedIndexChanged"
                                        Font-Size="12px" ClientIDMode="Static">
                                    </asp:CheckBoxList>
                                    <script type="text/javascript">
                                        window.onload = function () {
                                            var tmr = false;
                                            var labels = document.getElementById('chkemployeelist').getElementsByTagName('label');
                                            var func = function () {
                                                if (tmr)
                                                    clearTimeout(tmr);
                                                tmr = setTimeout(function () {
                                                    var regx = new RegExp(document.getElementById('inputSearch').value);


                                                    for (var i = 0, size = labels.length; i < size; i++)
                                                        if (document.getElementById('inputSearch').value.length > 0) {
                                                            if (labels[i].textContent.match(regx)) setItemVisibility(i, true);
                                                            else setItemVisibility(i, false);
                                                        }
                                                        else
                                                            setItemVisibility(i, true);
                                                }, 500);

                                                function setItemVisibility(position, visible) {
                                                    if (visible) {
                                                        labels[position].style.display = '';
                                                        labels[position].previousSibling.style.display = '';
                                                        if (labels[position].nextSibling != null)
                                                            labels[position].nextSibling.style.display = '';
                                                    }
                                                    else {
                                                        labels[position].style.display = 'none';
                                                        labels[position].previousSibling.style.display = 'none';
                                                        if (labels[position].nextSibling != null)
                                                            labels[position].nextSibling.style.display = 'none';

                                                    }
                                                }
                                            }

                                            if (document.attachEvent) document.getElementById('inputSearch').attachEvent('onkeypress', func);  // IE compatibility
                                            else document.getElementById('inputSearch').addEventListener('keydown', func, false); // other browsers
                                        };


                                        function sharad() {
                                            var tmr = false;

                                            var labels = document.getElementById('chkemployeelist').getElementsByTagName('label');
                                            var func = function () {
                                                if (tmr)
                                                    clearTimeout(tmr);
                                                tmr = setTimeout(function () {
                                                    var regx = new RegExp(document.getElementById('inputSearch').value);


                                                    for (var i = 0, size = labels.length; i < size; i++)
                                                        if (document.getElementById('inputSearch').value.length > 0) {
                                                            if (labels[i].textContent.match(regx)) setItemVisibility(i, true);
                                                            else setItemVisibility(i, false);
                                                        }
                                                        else
                                                            setItemVisibility(i, true);
                                                }, 500);

                                                function setItemVisibility(position, visible) {
                                                    if (visible) {
                                                        labels[position].style.display = '';
                                                        labels[position].previousSibling.style.display = '';
                                                        if (labels[position].nextSibling != null)
                                                            labels[position].nextSibling.style.display = '';
                                                    }
                                                    else {
                                                        labels[position].style.display = 'none';
                                                        labels[position].previousSibling.style.display = 'none';
                                                        if (labels[position].nextSibling != null)
                                                            labels[position].nextSibling.style.display = 'none';

                                                    }
                                                }
                                            }


                                            if (document.attachEvent) document.getElementById('inputSearch').attachEvent('onkeypress', func);  // IE compatibility
                                            else document.getElementById('inputSearch').addEventListener('keydown', func, false); // other browsers
                                        }



                                    </script>
                                </div>                           
                            </li>
                            </ul>

                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                 </div>
                 <div class="row" style="margin-left:auto; margin-right:auto; display:table; margin-top:10px; margin-bottom:10px;">
                                       <asp:Button ID="cmdShowReport" runat="server" Text="Save News" OnClick="cmdShowReport_Click"
                                OnClientClick="return validate()" type="button" class="btn btn-success " />
                            <i class="fa fa-plus;"></i>&nbsp;&nbsp;
                            <asp:Button ID="btnClose" runat="server" type="button" Text="Close" OnClick="btnClose_Click"
                                class="btn btn-danger" /><i class="fa fa-trash-o;"></i>
                 </div>
                </div>
              </div>
     
    </div></div></div></div>
</asp:Content>
